mySettings.markupSet.replaceWith   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
mySettings = {
0 ignored issues
show
Bug introduced by
The variable mySettings seems to be never declared. Assigning variables without defining them first makes them global. If this was intended, consider making it explicit like using window.mySettings.
Loading history...
2
    onShiftEnter:	{keepDefault:false, replaceWith:'<br />\n'},
3
    onCtrlEnter:	{keepDefault:false, openWith:'\n<p>', closeWith:'</p>\n'},
4
    onTab:			{keepDefault:false, openWith:'	 '},
5
    markupSet: [
6
        {name:'Heading 1', key:'1', openWith:'<h1(!( class="[![Class]!]")!)>', closeWith:'</h1>', placeHolder:'Your title here...' },
7
        {name:'Heading 2', key:'2', openWith:'<h2(!( class="[![Class]!]")!)>', closeWith:'</h2>', placeHolder:'Your title here...' },
8
        {name:'Heading 3', key:'3', openWith:'<h3(!( class="[![Class]!]")!)>', closeWith:'</h3>', placeHolder:'Your title here...' },
9
        {name:'Heading 4', key:'4', openWith:'<h4(!( class="[![Class]!]")!)>', closeWith:'</h4>', placeHolder:'Your title here...' },
10
        {name:'Heading 5', key:'5', openWith:'<h5(!( class="[![Class]!]")!)>', closeWith:'</h5>', placeHolder:'Your title here...' },
11
        {name:'Heading 6', key:'6', openWith:'<h6(!( class="[![Class]!]")!)>', closeWith:'</h6>', placeHolder:'Your title here...' },
12
        {name:'Paragraph', openWith:'<p(!( class="[![Class]!]")!)>', closeWith:'</p>' },
13
        {separator:'---------------' },
14
        {name:'Bold', key:'B', openWith:'(!(<strong>|!|<b>)!)', closeWith:'(!(</strong>|!|</b>)!)' },
15
        {name:'Italic', key:'I', openWith:'(!(<em>|!|<i>)!)', closeWith:'(!(</em>|!|</i>)!)' },
16
        {name:'Stroke through', key:'S', openWith:'<del>', closeWith:'</del>' },
17
        {separator:'---------------' },
18
        {name:'Ul', openWith:'<ul>\n', closeWith:'</ul>\n' },
19
        {name:'Ol', openWith:'<ol>\n', closeWith:'</ol>\n' },
20
        {name:'Li', openWith:'<li>', closeWith:'</li>' },
21
        {separator:'---------------' },
22
23
        //{name:'PictureSimple', key:'P', replaceWith:'<img src="[![Source:!:http://]!]" alt="[![Alternative text]!]" />' },
24
        {
25
            name:'Picture',
26
            key:'P',
27
            beforeInsert: function(markItUp) { InlineUpload.display(markItUp) }
0 ignored issues
show
Bug introduced by
The variable InlineUpload seems to be never declared. If this is a global, consider adding a /** global: InlineUpload */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
28
        },
29
30
        {name:'Link', key:'L', openWith:'<a href="[![Link:!:http://]!]"(!( title="[![Title]!]")!)>', closeWith:'</a>', placeHolder:'Your text to link...' },
31
        {separator:'---------------' },
32
        {name:'Clean', className:'clean', replaceWith:function(markitup) { return markitup.selection.replace(/<(.*?)>/g, "") } },
33
        {name:'Preview', className:'preview', call:'preview' },
34
        {separator:'---------------' },
35
        {name:'More', className:'mMore', key:'M', openWith:'\n<!--more-->\n'},
36
        {name:'Code',className:'ins-code-button', key:'D', replaceWith: function(markItUp) { InsCode.display(markItUp) }}
0 ignored issues
show
Bug introduced by
The variable InsCode seems to be never declared. If this is a global, consider adding a /** global: InsCode */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
37
    ]
38
};
39
40
$(document).ready(function() {
41
    $("textarea.markitup").markItUp(mySettings);
42
});
43
44